package bishi.meituan;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

/**
 * @Classname Main1
 * @Description TODO
 * @Date 2021/9/11 16:18
 * @Created by ASUS
 */
public class Main1 {

    public static List<Integer> allIntegers() {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        List<Integer> allInt = new ArrayList<>();
        for (int i = 0; i < line.length(); i++) {
            for (int j = i + 1; j <= line.length(); j++) {
                allInt.add(Integer.parseInt(line.substring(i, j)));
            }
        }
        System.out.println(allInt);
        return allInt;
    }

    public static void main(String[] args) {
        List<Integer> integers = allIntegers();
        List<Integer> collect = integers.stream().filter(a -> a % 22 == 0).collect(Collectors.toList());
        System.out.println(collect.size());
    }
}
